package com.leadingsoft.pwxk.converter;

import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.AirNoOrgInfoDto;
import com.leadingsoft.pwxk.model.AirNoOrgInfo;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class AirNoOrgInfoConverter extends AbstractConverter<AirNoOrgInfo, AirNoOrgInfoDto> {

	@Override
	protected AirNoOrgInfoDto toDtoActual(AirNoOrgInfo model) {
		// TODO Auto-generated method stub

		AirNoOrgInfoDto dto = new AirNoOrgInfoDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());

		dto.setAirwrwcode(model.getAirwrwcode());
		dto.setAirwrwname(model.getAirwrwname());
		dto.setCwname(model.getCwname());
		dto.setEmissioncon(model.getEmissioncon());
		dto.setEmissionname(model.getEmissionname());
		dto.setEmissiontslimit(model.getEmissiontslimit());
		dto.setEmpotencylimit(model.getEmpotencylimit());
		dto.setOthercontent(model.getOthercontent());
		dto.setQtcwname(model.getQtcwname());
		dto.setSqfiveyear(model.getSqfiveyear());
		dto.setSqfouryear(model.getSqfouryear());
		dto.setSqoneyear(model.getSqoneyear());
		dto.setSqthreeyear(model.getSqthreeyear());
		dto.setSqtwoyear(model.getSqtwoyear());
		dto.setTypename(model.getTypename());
		dto.setWrwid(model.getWrwid());
		dto.setWrwname(model.getWrwname());
		dto.setWrzlname(model.getWrzlname());
		dto.setXkdevicecode(model.getXkdevicecode());
		return dto;
	}

	public void copyProperties(AirNoOrgInfo model, AirNoOrgInfoDto dto) {
		// model.setId(dto.getId());
		// model.setDataid(dto.getDataid());

		model.setAirwrwcode(dto.getAirwrwcode());
		model.setAirwrwname(dto.getAirwrwname());
		model.setCwname(dto.getCwname());
		model.setEmissioncon(dto.getEmissioncon());
		model.setEmissionname(dto.getEmissionname());
		model.setEmissiontslimit(dto.getEmissiontslimit());
		model.setEmpotencylimit(dto.getEmpotencylimit());
		model.setOthercontent(dto.getOthercontent());
		model.setQtcwname(dto.getQtcwname());
		model.setSqfiveyear(dto.getSqfiveyear());
		model.setSqfouryear(dto.getSqfouryear());
		model.setSqoneyear(dto.getSqoneyear());
		model.setSqthreeyear(dto.getSqthreeyear());
		model.setSqtwoyear(dto.getSqtwoyear());
		model.setTypename(dto.getTypename());
		model.setWrwid(dto.getWrwid());
		model.setWrwname(dto.getWrwname());
		model.setWrzlname(dto.getWrzlname());
		model.setXkdevicecode(dto.getXkdevicecode());
	}

}
